<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
    <script src="js/axios.js"></script>
</head>

<body>
    <div id="app">
        <div>data: {{resByAxios}}</div>
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            resByAxios: ""
        },
        mounted() {
            alert("挂载成功，即将发送异步请求~")
            // 挂载成功后触发
            axios.get("https://i0.hdslb.com/bfs/svg-next/BDC/playdata_square_line/v1.json")
                .then(res => {
                    this.resByAxios = res;
                })
        },
    })
</script>

</html>